-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show time remaining for other players' turns in multiplayer and some other features #108
Conversation
These classes are unique to the context and adding the verbosity of "Game" does not clarify anything so the prefix can be removed.
keyPressed fires before the text field is updated whereas keyReleased fires after it. The previous approach meant that using a single-character username was not possible because the validation saw an empty field. Now it is possible.
All the code to run the timer was in place, it just needed an extra if-statement to avoid trying to shoot when the timer ran out on another player's turn.
@StenAL Could you please check the failing unit test? |
This makes automating set-up for testing a bit easier as it skips the need to input a username. To test for username vailidity, I reused the logic from TrackTestLoginPanel and moved the validation logic into a separate class. This also removes the System.exit calls from Launcher.call; those code paths were impossible to test since the whole Java instance was getting terminated. By returning an integer instead, we can check the return codes in tests.
I fixed the test now, I had accidentally written |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Probably waiting for 24h to merge this in case @pehala has comments on this.
When this was fully commented, Maven was recompiling the entire source every time it was run because the file was invalid. See https://stackoverflow.com/questions/17944108/maven-compiler-plugin-always-detecting-a-set-of-sources-as-stale Since the class is unused, it can be deleted. This speeds up the iteration cycle of server development by a few seconds.
The fixes championship games in single player.
This is in preparation of making the "Try Again Now" button on the canvas work.
This PR contains the following fixes/features:
System.exit
anymoreDatabase
class was fully commented out.This also includes some deobfuscation work in preparation of making the
Try Again Now
button work when a client is disconnected from the server.